// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from '@/store/index'
import 'element-ui/lib/theme-chalk/index.css';
import ElementUI from 'element-ui'

Vue.config.productionTip = false;
Vue.use(ElementUI);
Vue.prototype.DSE = dse

// if (id) {
//   //这里是防止用户手动刷新页面，整个app要重新加载,动态新增的路由，会消失，所以我们重新add一次
//   let routes = []
//   switch (id) {
//     case "8a7d81da60728566016072ca8aa70031":
//       routes = [{
//         path: "/",
//         redirect: "/pipe/pipeNet_route"
//       },
//       {
//         path: '/pipe/pipeNet_route', //管网信息管理
//         component: resolve => require(['@/pages/pipeNet_msg/main_route'], resolve),
//         name: 'pipeNet_route',
//         redirect: '/pipe/pipeNet_route/pipeNet_home',
//         children: [{
//           path: '/pipe/pipeNet_route/pipeNet_home',
//           component: resolve => require(['@/pages/pipeNet_msg/index'], resolve),
//           name: 'pipeNet_home'
//         }, {
//           path: '/pipe/pipeNet_route/pipeNet_msg',
//           component:resolve => require(['@/pages/pipeNet_msg/msg'], resolve),
//           name: 'pipeNet_msg'
//         },
//         {
//           path: '/pipe/pipeNet_route/pipeNet_msg/pdfView',
//           component: resolve => require(['@/pages/pipeNet_msg/preview'], resolve),
//           name: 'pdfView'
//         },
//         {
//           path: '/pipe/pipeNet_route/pipeNet_msgAnalysis',
//           component: resolve => require(['@/pages/pipeNet_msg/msg_analysis'], resolve),
//           name: 'pipeNet_msgAnalysis'
//         },
//         {
//           path: '/pipe/pipeNet_route/pipeNet_bagUser_manage',
//           component: resolve => require(['@/pages/pipeNet_msg/bagUser_manage'], resolve),
//           name: 'pipeNet_bagUser_manage'
//         }, {
//           path: '/pipe/pipeNet_route/pipeNet_waterInformation',
//           component: resolve => require(['@/pages/pipeNet_msg/waterInformation'], resolve),
//           name: 'pipeNet_waterInformation'
//         }, {
//           path: '/pipe/pipeNet_route/pipeNet_waterInformation/infoTable',
//           component:  resolve => require(['@/pages/pipeNet_msg/infoTable'], resolve),
//           name: 'infoTable'
//         }
//         ]
//       }];
//       break;
//     case "8a7d81da6076e2f70160785cb26600dc":
//       routes = [
//         {
//           path: "/",
//           redirect: "/pipe/monitor"
//         },
//         {
//           path: '/pipe/monitor', //管网监测管理
//           redirect: '/pipe/monitor/surver',
//           component: resolve => require(['@/pages/monitor/menu'], resolve),
//           children: [{
//               path: '/pipe/monitor/surver',
//               component: resolve => require(['@/pages/monitor/surver'], resolve),
//               name: 'pipe_monitor_surver'
//           }, {
//               path: '/pipe/monitor/earlyWarning',
//               component: resolve => require(['@/pages/monitor/earlyWarning'], resolve),
//               name: 'pipe_monitor_earlyWarning'
//           },
//           {
//               path: '/pipe/monitor/waterStatiastics',
//               component: resolve => require(['@/pages/monitor/waterStatiastics'], resolve),
//               name: 'pipe_monitor_waterStatiastics'
//           },
//           {
//               path: '/pipe/monitor/baseSet',
//               component: resolve => require(['@/pages/monitor/baseSet'], resolve),
//               name: 'pipe_monitor_baseSet'
//           },
//           {
//               path: '/pipe/monitor/dispatch',
//               component: resolve => require(['@/pages/monitor/dispatch'], resolve),
//               name: 'pipe_monitor_dispatch'
//           }
//           ]
//       }
//       ];
//       break;
//     case "8a7d81da6076e2f70160785cebf100dd":
//       routes = [
//         {
//           path: "/",
//           redirect: "/pipe/leaktest"
//         },
//         {
//           path: '/pipe/leaktest', //分区计量检漏管理
//           redirect: '/pipe/leaktest/zoning_leakDetection',
//           component: resolve => require(['@/pages/leaktest/menu'], resolve),
//           children: [
//               {
//                   path: '/pipe/leaktest/zoning_leakDetection',  //分区计量检漏
//                   component: resolve => require(['@/pages/leaktest/zoning_leakDetection'], resolve),
//                   name: 'pipe_leaktest_zoning_leakDetection'
//               },
//               {
//                   path: '/pipe/leaktest/monitorWarning',//监测预警
//                   component: resolve => require(['@/pages/leaktest/monitorWarning'], resolve),
//                   name: 'pipe_leaktest_monitorWarning'
//               },
//               {
//                   path: '/pipe/leaktest/partitionConfig', //分区配置
//                   component: resolve => require(['@/pages/leaktest/partitionConfig'], resolve),
//                   name: 'pipe_leaktest_partitionConfig'
//               }
//           ]
//       }
//       ];
//       break;
//     case "8a7d81da6076e2f70160785d1ea800de":
//       routes = [
//         {
//           path: "/",
//           redirect: "/pipe/rushrepair"
//         },
//         {
//           path: '/pipe/rushrepair', //管网巡检抢修管理
//           redirect: '/pipe/rushrepair/information',
//           component: resolve => require(['@/pages/rushrepair/menu'], resolve),
//           children: [{
//               path: '/pipe/rushrepair/information', //综合信息
//               component: resolve => require(['@/pages/rushrepair/information'], resolve),
//               name: 'pipe_rushrepair_information',
//           },
//           {
//               path: '/pipe/rushrepair/hiddenDanger',//隐患管理
//               component: resolve => require(['@/pages/rushrepair/hiddenDanger'], resolve),
//               name: 'pipe_rushrepair_hiddenDanger',
//           },
//           {
//               path: '/pipe/rushrepair/repair',//检修管理
//               component: resolve => require(['@/pages/rushrepair/repair'], resolve),
//               name: 'pipe_rushrepair_repair'
//           },
//           {
//               path: '/pipe/rushrepair/statistic',//统计管理
//               component: resolve => require(['@/pages/rushrepair/statistic'], resolve),
//               name: 'pipe_rushrepair_statistic'
//           }]
//       }
//       ];
//       break;
//       default:
//         routes = [
//           {
//             path:"*",
//             component:resolve => require(['@/pages/404'], resolve),
//             name:"noFound"
//           }
//         ]
//   }
//   router.addRoutes(routes);
// }

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})